home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
AIncludes
/
PCCardTuples.a
< prev
next >
Wrap
Text File
|
1996-05-01
|
15KB
|
352 lines
;
; File: PCCardTuples.a
;
; Contains: List of PCMCIA tuple types and definitions of tuple contents.
;
; Version: Technology: System 7.5
; Release: Universal Interfaces 3.0d3 on Copland DR1
;
; Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
;
; Bugs?: If you find a problem with this file, send the file and version
; information (from above) and the problem description to:
;
; Internet: apple.bugs@applelink.apple.com
; AppleLink: APPLE.BUGS
;
;
IF &TYPE('__PCCARDTUPLES__') = 'UNDEFINED' THEN
__PCCARDTUPLES__ SET 1
IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
include 'Types.a'
ENDIF
MAX_TUPLE_SIZE EQU 256
;
;------------------------------------------------------------------------------------------------------------------------------------------------
; Defines for Tuple codes
;------------------------------------------------------------------------------------------------------------------------------------------------
;
CISTPL_NULL EQU $00
CISTPL_DEVICE EQU $01
CISTPL_LONGLINK_MFC EQU $06
CISTPL_CHECKSUM EQU $10
CISTPL_LONGLINK_A EQU $11
CISTPL_LONGLINK_C EQU $12
CISTPL_LINKTARGET EQU $13
CISTPL_NO_LINK EQU $14
CISTPL_VERS_1 EQU $15
CISTPL_ALTSTR EQU $16
CISTPL_DEVICE_A EQU $17
CISTPL_JEDEC_C EQU $18
CISTPL_JEDEC_A EQU $19
CISTPL_CONFIG EQU $1A
CISTPL_CFTABLE_ENTRY EQU $1B
CISTPL_DEVICE_OC EQU $1C
CISTPL_DEVICE_OA EQU $1D
CISTPL_DEVICE_GEO EQU $1E
CISTPL_DEVICE_GEO_A EQU $1F
CISTPL_MANFID EQU $20
CISTPL_FUNCID EQU $21
CISTPL_FUNCE EQU $22
CISTPL_SWIL EQU $23
CISTPL_VERS_2 EQU $40
CISTPL_FORMAT EQU $41
CISTPL_GEOMETRY EQU $42
CISTPL_BYTEORDER EQU $43
CISTPL_DATE EQU $44
CISTPL_BATTERY EQU $45
CISTPL_ORG EQU $46
CISTPL_VENDOR EQU $FE
CISTPL_END EQU $FF
;
;------------------------------------------------------------------------------------------------------------------------------------------------
; Tuple Data Block Definitions
;------------------------------------------------------------------------------------------------------------------------------------------------
;
; ------------ Device Information Tuple (01H, 17H) -----------
DeviceIDTuple RECORD 0
TPLDEV_TYPE_WPS_SPEED ds.b 1 ; offset: $0 (0) ; Device Type Code: 7-4, WPS: 3, Device Speed: 2-0
deviceData ds.b 253 ; offset: $1 (1)
sizeof EQU * ; size: $FE (254)
ENDR
TPLDEV_TYPE_MASK EQU $F0 ; device type mask for TPLDEV_TYPE_WPS_SPEED
TPLDEV_TYPE_EXTENDED EQU $E0 ; device type value for extended type
TPLDEV_WPS_MASK EQU $08 ; write-protect switch mask for TPLDEV_TYPE_WPS_SPEED
TPLDEV_SPEED_MASK EQU $07 ; device speed mask for TPLDEV_TYPE_WPS_SPEED
TPLDEV_DSPEED_NULL EQU $00 ; speed for null device type
TPLDEV_DSPEED_250NS EQU $01 ; 250ns card access time
TPLDEV_DSPEED_200NS EQU $02 ; 200ns card access time
TPLDEV_DSPEED_150NS EQU $03 ; 150ns card access time
TPLDEV_DSPEED_100NS EQU $04 ; 100ns card access time
TPLDEV_EXTENDED_SPEED EQU $07 ; device speed value for extended speed
TPLDEV_SPEED_EXPONENT EQU $07 ; extended byte exponent mask
TPLDEV_SPEED_MANTISSA EQU $78 ; extended byte mantissa mask
TPLDEV_SPEED_EXTENDED_MASK EQU $80 ; bit set if more extended speed data follows
; device ID types
DTYPE_NULL EQU 0
DTYPE_ROM EQU 1
DTYPE_OTPROM EQU 2
DTYPE_EPROM EQU 3
DTYPE_EEPROM EQU 4
DTYPE_FLASH EQU 5
DTYPE_SRAM EQU 6
DTYPE_DRAM EQU 7
DTYPE_FUNCSPEC EQU $0D
DTYPE_EXTEND EQU $0E
; --------------- Checksum Control Tuple (10H) ---------------
ChecksumControlTuple RECORD 0
TPLCKS_ADDR ds.w 1 ; offset: $0 (0) ; offset to region to be checksummed, LSB first
TPLCKS_LEN ds.w 1 ; offset: $2 (2) ; length of region to be checksummed, LSB first
TPLCKS_CS ds.b 1 ; offset: $4 (4) ; checksum of the region
reserved ds.b 1 ; offset: $5 (5) ; padding
sizeof EQU * ; size: $6 (6)
ENDR
; ---------------- Long Link Multi-Function Tuple (06H) ------
LongLinkMFCTuple RECORD 0
TPLMFC_NUM ds.b 1 ; offset: $0 (0) ; Number of sets of config registers for individual functions
TPLMFC_TAS1 ds.b 1 ; offset: $1 (1) ; CIS target address space for first function (00 = Attr, 01 = Common)
TPLMFC_ADDR1 ds.l 1 ; offset: $2 (2) ; Target address of first CIS, unsigned long, lsb first
TPLMFC_TAS2 ds.b 1 ; offset: $6 (6) ; CIS target address space for second function (00 = Attr, 01 = Common)
ORG 8
TPLMFC_ADDR2 ds.b 4 ; offset: $8 (8) ; [MISALIGNED!] Target address of second CIS, unsigned long, lsb first
; the following fields are of undetermined length and should be calculated at runtime
;
; UInt8 TPLMFC_TASn;
; UInt32 TPLMFC_ADDRn;
sizeof EQU * ; size: $C (12)
ENDR
; ---------------- Long Link Tuple (11H, 12H) ----------------
LongLinkTuple RECORD 0
TPLL_ADDR ds.l 1 ; offset: $0 (0) ; target address, LSB first
sizeof EQU * ; size: $4 (4)
ENDR
; ----------------- Link Target Tuple (13H) ------------------
LinkTargetTuple RECORD 0
TPLL_TAG ds.b 3 ; offset: $0 (0) ; tag: should be 'C', 'I', 'S'
ORG 4
sizeof EQU * ; size: $4 (4)
ENDR
; ---------------- Level 1 Version Tuple (15H) ---------------
Level1VersionTuple RECORD 0
TPLLV1_MAJOR ds.b 1 ; offset: $0 (0) ; major version number (0x04)
TPLLV1_MINOR ds.b 1 ; offset: $1 (1) ; minor version number (0x01 for release 2.0 and 2.01)
TPLLV1_INFO ds.b 1 ; offset: $2 (2) <-- really an array of length one ; product information string, zero-terminated
ORG 4
sizeof EQU * ; size: $4 (4)
ENDR
; ------------- JEDEC Identifier Tuple (18H, 19H) ------------
JEDECDeviceInfo RECORD 0
manufacturerID ds.b 1 ; offset: $0 (0)
manufacturerInfo ds.b 1 ; offset: $1 (1)
sizeof EQU * ; size: $2 (2)
ENDR
JEDECIdentifierTuple RECORD 0
device ds JEDECDeviceInfo ; offset: $0 (0) <-- really an array of length one
sizeof EQU * ; size: $2 (2)
ENDR
; --------- Configuration Tuple (1AH) ----------
ConfigTuple RECORD 0
TPCC_SZ ds.b 1 ; offset: $0 (0) ; size of fields byte
TPCC_LAST ds.b 1 ; offset: $1 (1) ; index number of last config entry
TPCC_RADR ds.b 1 ; offset: $2 (2) ; config reg's base addr in reg. space
reserved ds.b 1 ; offset: $3 (3) ; padding
; the following fields are of undetermined length and should be calculated at runtime
; UInt32 TPCC_RMSK;
; UInt32 TPCC_RSVD;
; UInt32 TPCC_SBTPL;
sizeof EQU * ; size: $4 (4)
ENDR
; TPCC_RADR field definitions
TPCC_RASZ EQU $03 ; bits 1-0
TPCC_RMSZ EQU $3C ; bits 5-2
TPCC_RFSZ EQU $C0 ; bits 7-6
; --------- Device Geometry Tuple (1EH, 1FH) ----------
DeviceGeometry RECORD 0
DGTPL_BUS ds.b 1 ; offset: $0 (0) ; system bus width = 2^(n-1), n>0
DGTPL_EBS ds.b 1 ; offset: $1 (1) ; erase block size = 2^(n-1), n>0
DGTPL_RBS ds.b 1 ; offset: $2 (2) ; read block size = 2^(n-1), n>0
DGTPL_WBS ds.b 1 ; offset: $3 (3) ; write block size = 2^(n-1), n>0
DGTPL_PART ds.b 1 ; offset: $4 (4) ; partitioning size = 2^(n-1), n>0
DGTPL_HWIL ds.b 1 ; offset: $5 (5) ; hardware interleave = 2^(n-1), n>0
sizeof EQU * ; size: $6 (6)
ENDR
DeviceGeometryTuple RECORD 0
device ds.b 42 * DeviceGeometry.sizeof ; offset: $0 (0)
sizeof EQU * ; size: $FC (252)
ENDR
; --------- Manufacturer Identification Tuple (20H) ----------
ManufIDTuple RECORD 0
TPLMID_MANF ds.w 1 ; offset: $0 (0) ; PCMCIA PC Card manufacturer code
TPLMID_CARD ds.w 1 ; offset: $2 (2) ; manufacturer information (part number and/or revision)
sizeof EQU * ; size: $4 (4)
ENDR
; ----------- Function Identification Tuple (21H) ------------
FunctionIDTuple RECORD 0
TPLFID_FUNCTION ds.b 1 ; offset: $0 (0) ; PC card function code
TPLFID_SYSINIT ds.b 1 ; offset: $1 (1) ; system initialization bit mask
sizeof EQU * ; size: $2 (2)
ENDR
; function codes
TPLFID_MultiFunction EQU 0
TPLFID_Memory EQU 1
TPLFID_SerialPort EQU 2
TPLFID_ParallelPort EQU 3
TPLFID_FixedDisk EQU 4
TPLFID_VideoAdaptor EQU 5
TPLFID_NetworkLANAdaptor EQU 6
TPLFID_AIMS EQU 7
; ------------ Software Interleave Tuple (23H) ---------------
SoftwareInterleaveTuple RECORD 0
TPLSWIL_INTRLV ds.b 1 ; offset: $0 (0) ; software interleave
ORG 2
sizeof EQU * ; size: $2 (2)
ENDR
; ------- Level 2 Version and Information Tuple (40H) --------
Level2VersionTuple RECORD 0
TPLLV2_VERS ds.b 1 ; offset: $0 (0) ; structure version (0x00)
TPLLV2_COMPLY ds.b 1 ; offset: $1 (1) ; level of compliance with the standard (0x00)
TPLLV2_DINDEX ds.w 1 ; offset: $2 (2) ; byte address of first data byte in card, LSB first
TPLLV2_RSV6 ds.b 1 ; offset: $4 (4) ; reserved, must be zero
TPLLV2_RSV7 ds.b 1 ; offset: $5 (5) ; reserved, must be zero
TPLLV2_VSPEC8 ds.b 1 ; offset: $6 (6) ; vendor specific byte
TPLLV2_VSPEC9 ds.b 1 ; offset: $7 (7) ; vendor specific byte
TPLLV2_NHDR ds.b 1 ; offset: $8 (8) ; number of copies of CIS present on this device
TPLLV2_OEM ds.b 1 ; offset: $9 (9) <-- really an array of length one ; vendor of software that formatted card, zero-terminated
TPLLV2_INFO ds.b 1 ; offset: $A (10) <-- really an array of length one ; informational message about the card, zero-terminated
reserved ds.b 1 ; offset: $B (11) ; padding
sizeof EQU * ; size: $C (12)
ENDR
;
;-------------------- Format Tuple (41H) --------------------
; additional information for disk type:
;
FormatDiskTuple RECORD 0
TPLFMT_BKSZ ds.w 1 ; offset: $0 (0) ; block size, or zero if unblocked format
TPLFMT_NBLOCKS ds.l 1 ; offset: $2 (2) ; number of data blocks in this partition
TPLFMT_EDCLOC ds.l 1 ; offset: $6 (6) ; location of error detection code, or zero if interleaved
sizeof EQU * ; size: $A (10)
ENDR
; additional information for disk type:
FormatMemTuple RECORD 0
TPLFMT_FLAGS ds.b 1 ; offset: $0 (0) ; various flags
TPLFMT_RESERVED ds.b 1 ; offset: $1 (1) ; reserved, set to zero
TPLFMT_ADDRESS ds.l 1 ; offset: $2 (2) ; physical location at which this memory partion must be mapped
TPLFMT_EDCLOC ds.l 1 ; offset: $6 (6) ; location of error detection code, or zero if interleaved
sizeof EQU * ; size: $A (10)
ENDR
FormatTuple RECORD 0
TPLFMT_TYPE ds.b 1 ; offset: $0 (0) ; format type code
TPLFMT_EDC ds.b 1 ; offset: $1 (1) ; error detection method and length of error detection code
TPLFMT_OFFSET ds.l 1 ; offset: $2 (2) ; offset to first data byte in this partition
TPLFMT_NBYTES ds.l 1 ; offset: $6 (6) ; number of data bytes in this partition
TPLFMT_DISK ds FormatDiskTuple ; offset: $A (10)
ORG 10
TPLFMT_MEM ds FormatMemTuple ; offset: $A (10)
sizeof EQU * ; size: $14 (20)
ENDR
; format types
TPLFMTTYPE_DISK EQU 0
TPLFMTTYPE_MEM EQU 1
TPLFMTTYPE_VS EQU $80
; error detection types
TPLFMTEDC_NONE EQU 0
TPLFMTEDC_CKSUM EQU 1
TPLFMTEDC_CRC EQU 2
TPLFMTEDC_PCC EQU 3
TPLFMTEDC_VS EQU 8
; bits in TPLFMT_FLAGS
TPLFMTFLAGS_ADDR EQU 0
TPLFMTFLAGS_AUTO EQU 1
; ------------------ Geometry Tuple (42H) --------------------
GeometryTuple RECORD 0
TPLGEO_SPT ds.b 1 ; offset: $0 (0) ; number of sectors per track
TPLGEO_TPC ds.b 1 ; offset: $1 (1) ; number of tracks per cylinder
TPLGEO_NCYL ds.w 1 ; offset: $2 (2) ; number of cylinders, total
sizeof EQU * ; size: $4 (4)
ENDR
; ----------------- Byte-Order Tuple (43H) -------------------
ByteOrderTuple RECORD 0
TPLBYTE_ORDER ds.b 1 ; offset: $0 (0) ; byte order code
TPLBYTE_MAP ds.b 1 ; offset: $1 (1) ; byte mapping code
sizeof EQU * ; size: $2 (2)
ENDR
; byte order codes
TYPBYTEORD_LOW EQU 0
TYPBYTEORD_HIGH EQU 1
TYPBYTEORD_VS EQU $80
; byte mapping codes
TYPBYTEMAP_LOW EQU 0
TYPBYTEMAP_HIGH EQU 1
TYPBYTEMAP_VS EQU $80
; ---------- Card Initialization Date Tuple (44H) ------------
CardInitDateTuple RECORD 0
TPLDATE_TIME ds.w 1 ; offset: $0 (0) ; hours, minutes, seconds
TPLDATE_DAY ds.w 1 ; offset: $2 (2) ; year, month, day
sizeof EQU * ; size: $4 (4)
ENDR
; ---------- Battery-Replacement Date Tuple (45H) ------------
BatteryReplaceDateTuple RECORD 0
TPLBATT_RDAY ds.w 1 ; offset: $0 (0) ; last replacement date (year, month, day)
TPLBATT_XDAY ds.w 1 ; offset: $2 (2) ; battery expiration date (year, month, day)
sizeof EQU * ; size: $4 (4)
ENDR
; ---------------------- General Tuple -----------------------
TupleBody RECORD 0
deviceID ds DeviceIDTuple ; offset: $0 (0)
ORG 0
checksum ds ChecksumControlTuple ; offset: $0 (0)
ORG 0
link ds LongLinkTuple ; offset: $0 (0)
ORG 0
target ds LinkTargetTuple ; offset: $0 (0)
ORG 0
level1 ds Level1VersionTuple ; offset: $0 (0)
ORG 0
jedecID ds JEDECIdentifierTuple ; offset: $0 (0)
ORG 0
config ds ConfigTuple ; offset: $0 (0)
ORG 0
devGeo ds DeviceGeometryTuple ; offset: $0 (0)
ORG 0
manufID ds ManufIDTuple ; offset: $0 (0)
ORG 0
funcID ds FunctionIDTuple ; offset: $0 (0)
ORG 0
swil ds SoftwareInterleaveTuple ; offset: $0 (0)
ORG 0
level2 ds Level2VersionTuple ; offset: $0 (0)
ORG 0
format ds FormatTuple ; offset: $0 (0)
ORG 0
geometry ds GeometryTuple ; offset: $0 (0)
ORG 0
order ds ByteOrderTuple ; offset: $0 (0)
ORG 0
initDate ds CardInitDateTuple ; offset: $0 (0)
ORG 0
battDate ds BatteryReplaceDateTuple ; offset: $0 (0)
ORG 0
tupleData ds.b 254 ; offset: $0 (0)
sizeof EQU * ; size: $FE (254)
ENDR
Tuple RECORD 0
TPL_CODE ds.b 1 ; offset: $0 (0)
TPL_LINK ds.b 1 ; offset: $1 (1)
TPL_BODY ds TupleBody ; offset: $2 (2)
sizeof EQU * ; size: $100 (256)
ENDR
ENDIF ; __PCCARDTUPLES__